package app.business
{
	import flash.data.SQLStatement;
	
	import mx.collections.ArrayCollection;

	public class BaseDelegate
	{
		private var baseConn:BaseConn  = new BaseConn(); 
		public function BaseDelegate()
		{
		}
		
		//获取所有用户的集合
		public function GetAllRole():ArrayCollection
		{
			var sql:String = "SELECT * FROM race";
			
			
			var stmt:SQLStatement = new SQLStatement();
			stmt.sqlConnection = baseConn.sqlConnection;
			stmt.text = sql;
			stmt.execute();
			var result:Array = stmt.getResult().data;
			if (result)
			{
				var list:ArrayCollection = new ArrayCollection();
				for (var i:int=0; i<result.length; i++)
				{
					//list.addItem(GetRow(result[i]));	
				}
				return list;
			}
			else
			{
				return null;
			}
		}
	}
}